<template>
  <svg class="svg-icon" aria-hidden="true">
    <use :xlink:href="`#icon-${icon}`" />
  </svg>
</template>

<script setup>
const props = defineProps({
  // icon 图标
  icon: {
    type: String,
    required: true,
  },
  // 图标类名
  className: {
    type: String,
    default: "",
  },
});
</script>

<style scoped>
.svg-icon {
  width: 20px;
  height: 20px;
  overflow: hidden;
}
svg {
  outline: none;
}
</style>
